<template>
  <div class="bgc-default pad-20">
    <div class="bg-color-white">
      <div class="tabs-box mar-t--10">
        <el-tabs v-model="tabActive">
          <el-tab-pane label="普通订单" name="normal"></el-tab-pane>
          <el-tab-pane label="跨境批发订单" v-if="crossBorderData.crossBorderBusinessFlag === 1" name="crossBorder">
          </el-tab-pane>
        </el-tabs>
      </div>
      <!-- 普通订单 -->
      <wholesale-normal-order v-if="tabActive == 'normal'"></wholesale-normal-order>
      <!-- 跨境订单 -->
      <wholesale-cross-border-order v-if="tabActive == 'crossBorder'"></wholesale-cross-border-order>
    </div>
  </div>
</template>


<script>
  import wholesaleNormalOrder from './../components/wholesale-normal-order'
  import wholesaleCrossBorderOrder from './../components/wholesale-cross-border-order'
  import {
    getByEnterpriseId
  } from '@/api/user/enterprise'
  export default {
    components: {
      wholesaleNormalOrder,
      wholesaleCrossBorderOrder
    },
    data() {
      return {
        tabActive: 'normal',
        crossBorderData: {}
      }
    },
    created() {
      getByEnterpriseId(this.getEnterpriseId()).then(response => {
        this.crossBorderData = response.data
      })
    },
    methods: {}
  }
</script>

<style lang="less" scoped>

</style>

